function findRepeatNumber(nums: number[]): number {

    // let buffer: ArrayBuffer = new ArrayBuffer(100000);
    let bol:boolean[] = new Array<boolean>(100000);
    for (let i of nums) {
        if(!bol[i]){
            bol[i] = true;
        }else{
            return i;
        }
    }
    return -1;
};